//
//  GetCarPreviewControllerViewController.m
//  ICrEAM
//
//  Created by Cty on 2016/10/29.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "GetCarPreviewControllerViewController.h"
#import "PreviewView.h"
#import "ICMAppearanceCheckView.h"
#import "ICMBasicInfoModel.h"
#import "ICMCarePackageDownModel.h"
#import "ICMCheckAppearanceDownModel.h"
#import "ICMPartsTopModel.h"
#import "ICMCarePackageModel.h"
#import "ICMActivityModel.h"
#import "ICMPictureModel.h"
#import "ICMRepairMaintenanceModel.h"
#import "ICMRepairPartsModel.h"
@interface GetCarPreviewControllerViewController () <PreviewViewDelegate>

@end

@implementation GetCarPreviewControllerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    UIScrollView *previewList = [[UIScrollView alloc]initWithFrame:CGRectMake(0, ActualHeight(40), ScreenWidth, ScreenHeight - NavBarAndStatusHeight-ActualHeight(40))];
    
    
    CGRect rect = CGRectMake(0, 0, ScreenWidth, ActualHeight(4100));
    
    PreviewView *preview = [[PreviewView alloc]initWithFrame:rect];
    preview.isInner = self.isInner;
    preview.basicInfoModel = self.basicInfoModel;
    preview.checkAppearanceTopModel = self.checkAppearanceTopModel;
    preview.checkAppearanceDownModel = self.checkAppearanceDownModel;
    preview.activityModel = self.activityModel;
    preview.carePackageModel = self.carePackageModel;
    preview.carePackageDownModel = self.carePackageDownModel;
    preview.partsTopModel = self.partsTopModel;
    preview.repairEventModel = self.repairEventModel;
    preview.repairPartsModel = self.repairPartsModel;
//    preview.SERIES_LABOUR_PRICE = self.partsTopModel.SERIES_LABOUR_PRICE;
    preview.delegate = self;
    [preview setUpChildView];
    preview.frame = CGRectMake(0, 0, ScreenWidth, preview.endFrame.origin.y+preview.endFrame.size.height+ActualHeight(10));
    previewList.contentSize = preview.frame.size;
    previewList.pagingEnabled = NO;
    
    [previewList addSubview:preview];
    

    [self.view addSubview:previewList];
}

#pragma mark 打印
- (void)print {
    [ICrEAMTool ipadPrintWithPrintType:GetCarPrintType printId:self.basicInfoModel.RECEPTION_NO Controller:self andEstimatePrice:nil];
}



@end
